<?php
if (!defined('ROOT')) exit('Can\'t Access !');

/**
 * 基础视图类
 * Class view_class
 */
class view_class
{
    public function __construct()
    {
        $_REQUEST['mod'] = empty($_REQUEST['mod']) ? 'index' : $_REQUEST['mod'];
        $_REQUEST['act'] = empty($_REQUEST['act']) ? 'main'  : $_REQUEST['act'];

        $this->controller($_REQUEST['mod'],$_REQUEST['act']);
    }

    public function controller($module,$action)
    {
        $this->ctl = new controller_class($module,$action);
    }

    public function display()
    {
        $this->ctl->display();
    }

    public function __destruct(){
    }
}
?>